package com.lyx.controller;


import com.lyx.entity.District;
import com.lyx.service.DistrictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lyx
 * @since 2022-02-22
 */
@Api(tags = "District控制器")
@RestController
@CrossOrigin
public class DistrictController {

    @Autowired
    DistrictService districtService;

    @ApiOperation(value = "查询列表")
        @GetMapping("/find")
    public List<District> districtServices(){
        return districtService.list();
    }


}

